package com.eastidea.live.ot;

import net.sf.json.JSONObject;

import com.eastidea.live.entity.FrmUiField;

public class FieldOt {
	public static FrmUiField setUiElementProperties(FrmUiField po, JSONObject obj) {	
		Long id = null;
		try {
			id = obj.getLong("id");
		} catch (Exception e) {
			System.out.println("new element");
		}
		
		po.setId(id);
		
		po.setCode(obj.getString("code"));
		po.setStatus(obj.getInt("status"));
		po.setIsRequired(Boolean.valueOf(obj.getString("isRequired")));
		po.setIndexx(obj.getInt("indexx"));
		return po;
	}
}
